import java.util.Scanner;

public class Test2 {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        System.out.println("请输入十个数");
        int[] nums = new int[10];
        for (int i = 0; i < 10; i++) {
            nums[i] = scanner.nextInt();
        }
        int count1 = 0;
        int count2 = 0;
        int count3 = 0;
        int count4 = 0;
        for (int i = 0; i < 10; i++) {
            if (nums[i] == 1){
                count1++;
            }
            else if(nums[i] == 2){
                count2++;
            }
            else if(nums[i] == 3){
                count3++;
            }
            else{
                count4++;
            }
        }
        System.out.println("数字1的个数为："+count1);
        System.out.println("数字2的个数为："+count2);
        System.out.println("数字3的个数为："+count3);
        System.out.println("非法数字的个数为："+count4);
    }
}
